package cn.fancy.sdk.pay.entity;

import android.content.Context;
import cn.fancy.sdk.utils.MoneyDiscountHelper;
import cn.fancy.sdk.utils.SpMmkvUtils;
import java.util.Objects;

public class CpPaymentEntity {

	/**
	 * 充值金额 
	 */
	private float money;
	
	/**
	 * 自定义标题 (如 "余额不足,请充值")
	 */
	private String titleStr;

	
	/**
	 * 商品描述
	 * */
	private String item_desc;

	/**
	 * 内部订单号
	 * */
	private String propsId;
	
	/**
	 * 透传参数
	 */
	private String cpData;
	
	
	public String getPropsId() {
		return propsId;
	}

	public void setPropsId(String propsId) {
		this.propsId = propsId;
	}

	private String ext;
	
	public String getTitleStr() {
		return titleStr;
	}

	public void setTitleStr(String titleStr) {
		this.titleStr = titleStr;
	}

	public float getMoney() {
		return money;
	}
	
	public float getDiscountMoney(Context context) {
		if (MoneyDiscountHelper.needDiscount(context)) {
			return MoneyDiscountHelper.calculateMoneyAfterDiscount(context, money);
		}
		return money;
	}

	public void setMoney(int money) {
		this.money = money;
	}
	
	public void setMoney(float money) {
		this.money = money;
	}

	public String getItem_desc() {
		return item_desc;
	}

	public void setItem_desc(String item_desc) {
		this.item_desc = item_desc;
	}
	
	public String getExt() {
		return ext;
	}

	public void setExt(String ext) {
		this.ext = ext;
	}
	
	public String getCpData() {
		return cpData;
	}
	
	public void setCpData(String cpData) {
		this.cpData = cpData;
	}
}
